<?php

require_once 'ActionFramework/start.php';
require_once 'actions/login_by_url.cls.php';

class RejectByUrlAction extends LoginByUrlAction {
	
	const INPUT_REJECTED_USER_ID = ManageRejectionAction::INPUT_REJECTED_USER_ID;
	
	public function __construct() {
		parent::__construct();
		$this->add_input(new Input(RejectByUrlAction::INPUT_REJECTED_USER_ID));
	}
	
	public function redirect_valid_credentials(Array $request) {
		// Let normal rejection mechanism handle this. For that purpose, alter the
		// action type of the request first.
		$request[ManageRejectionAction::INPUT_OPERATION] = ManageRejectionAction::REJECT;
		return r(new ManageRejectionAction())->trigger($request); 	
	}
	
}

?>